<?php

namespace App\Http\Controllers\Api\V1;

use App\Models\Photo;
use App\Http\Controllers\Api\V1\Resources\PhotoResource;

class PhotosController extends Controller
{
    public function index()
    {
    	PhotoResource::wrap('data');
    	$photos= Photo::query()->orderByDesc('id')->get();
        
    	return PhotoResource::collection($photos);
    }
}
